public class CPU {
	private Process m_process;
	private long m_totalCycles;
	private long m_busyCycles;

	public CPU() {
		m_process = null;
		m_totalCycles = 0;
		m_busyCycles = 0;
	}

	//
	// Accessors
	//

	public Process getProcess() {
		return m_process;
	}

	public long getTotalCycles() {
		return m_totalCycles;
	}

	public long getBusyCycles() {
		return m_busyCycles;
	}

	//
	// Mutators
	//

	public void setProcess(Process proc) {
		m_process = proc;
	}

	public void execute() {
		if (m_process != null) {
			m_process.execute();
			++m_busyCycles;
		}
		++m_totalCycles;
	}
}
